package swing;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder;

public class JSlitPaneDemo01 extends JFrame {

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					JSlitPaneDemo01 frame = new JSlitPaneDemo01();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public JSlitPaneDemo01() {
		JFrame frame=new JFrame("welcome to mldn");
		Container cont=frame.getContentPane();
		JSplitPane lfsplit=null;
		JSplitPane tbsplit=null;
		lfsplit=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JLabel("左标签"),new JLabel("右标签"));
		lfsplit.setDividerLocation(50);
		tbsplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,lfsplit,new JLabel("下标签") );
		tbsplit.setDividerLocation(20);
		tbsplit.setOneTouchExpandable(true);
		cont.add(tbsplit);
		frame.setSize(230, 80);
		frame.setLocation(300, 200);
		frame.setVisible(true);
	}

}
